]> dgit.raspbian.org Git - gnome-shell.git/commit
texture-cache: Avoid creating unnecessary ClutterImages
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 24 Jan 2019 15:57:40 +0000 (13:57 -0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 24 Jan 2019 18:23:58 +0000 (16:23 -0200)
commit1847a4f4ccc99194d69135c19a7accfd767ef9cb
tree7c8cf4b08c16c37d498c2bb5d151188859e2f0ed
parentdeec0bf25506f5ddae10bedb5b9cbfafc4730db2
texture-cache: Avoid creating unnecessary ClutterImages

After loading the GdkPixbuf, StTextureCache unconditionally
creates a ClutterImage and, if it's not in the cache, add
it to the cache. That's a waste of resources when the image
is already committed to the texture cache.

Fix that by reusing the ClutterImage of the cache if it is
already there; otherwise, create a new ClutterImage as we
were previously doing.
src/st/st-texture-cache.c